<template>
	<view>
		<uni-table border stripe emptyText="暂无更多数据" >
		    <!-- 表头行 -->
		    <uni-tr>
		        <uni-th align="center">游戏玩家</uni-th>
		        <uni-th align="center">游戏分数</uni-th>
		    </uni-tr>
		    <!-- 表格数据行 -->
		    <uni-tr v-for="item in list">
		        <uni-td>{{item.loginName}}</uni-td>
		        <uni-td>{{item.gameScore}}</uni-td>
		    </uni-tr>
		</uni-table>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 数据表名
				gameTime: '',
				gameNumber:'',
				list:[]
			};
		},
		onLoad(obj) {
			this.gameTime = obj.gameTime;
			this.gameNumber = obj.gameNumber;
			let data = {gameTime:this.gameTime,gameNumber:this.gameNumber};
			this.selectByTimeAndNumber(data);
		},
		methods: {
			selectByTimeAndNumber(obj) {
				this.$u.api.selectByTimeAndNumber(obj).then((res)=>{
					this.list = res.rows
					console.log(111,res);
				}).catch((error)=>{
					console.log(222,error);
				});
			}
		}
	};
</script>

<style lang="scss">
	
</style>
